package org.assertj.ohos.api.telephony;

import ohos.telephony.SignalInformation;
import org.assertj.core.api.AbstractAssert;

import static org.assertj.core.api.Assertions.assertThat;

public abstract class AbstractCellSignalStrengthAssert<S extends AbstractCellSignalStrengthAssert<S, A>, A extends SignalInformation> extends AbstractAssert<S, A> {
  protected AbstractCellSignalStrengthAssert(A actual, Class<S> selfType) {
    super(actual, selfType);
  }

/* // TODO: wang, not found in ohos
  public S hasAsuLevel(int level) {
    isNotNull();
    int actualLevel = actual.getAsuLevel();
    assertThat(actualLevel) //
        .overridingErrorMessage("Expected ASU level <%s> but was <%s>.", level, actualLevel) //
        .isEqualTo(level);
    return myself;
  }

  public S hasDbm(int dbm) {
    isNotNull();
    int actualDbm = actual.getSignalStrength();
    assertThat(actualDbm) //
        .overridingErrorMessage("Expected dBm <%s> but was <%s>.", dbm, actualDbm) //
        .isEqualTo(dbm);
    return myself;
  }*/

  public S hasLevel(int level) {
    isNotNull();
    int actualLevel = actual.getSignalLevel();
    assertThat(actualLevel) //
        .overridingErrorMessage("Expected level <%s> but was <%s>.", level, actualLevel) //
        .isEqualTo(level);
    return myself;
  }
}
